﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using SharpMap.Utilities;


namespace RSIS.Config
{
    /// <summary>
    /// 添加系统配置的命令
    /// </summary>
    /// 
    public class ConfigCmd:BaseCommand
    {
        //private Form m_pMainForm;
        //private SharpMap.Forms.MapImage m_pMapImage;
        private ConfigForm m_frmConfig;

        public ConfigCmd()
		{
			base.m_caption = "系统配置";
			//base.m_category = "RPISEditor";
			//base.m_message = "添加新楼盘";
            base.m_name = "ConfigCmd";
			base.m_toolTip = "系统配置";
			
		}

        public override void OnCreate(object hook)
        {
            //throw new Exception("The method or operation is not implemented.");
            //m_pMainForm = (Form)hook;
            ////得到MapControl
            //for (int i = 0; i <= m_pMainForm.Controls.Count; i++)
            //{
            //    if (m_pMainForm.Controls[i].Name == "mcMainMap")
            //    {
            //        m_pMapImage = (MapImage)m_pMainForm.Controls[i];
            //        break;

            //    }
            //}
        }

        public override void OnClick()
        {
            base.OnClick();
            m_frmConfig = new ConfigForm();
            
            m_frmConfig.ShowDialog();
        }
    }

}
